package com.tianruan.dc.modules.sys.user.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

@Mapper
public interface BindWXMapper {

    @Insert("INSERT INTO t_sys_user_wechat_openid (id,user_id, openid, create_date) VALUES(#{Id},#{userId}, #{openid},NOW())")
    void bind(String Id,String userId, String openid);

    @Select("SELECT user_id FROM t_sys_user_wechat_openid WHERE openid = #{openid}")
    String selectBind(String openId);
}
